-- CALC_SHIP_MAGIC

-- 计算幽灵船魔力值
-- @param ship    幽灵船
return function(ship, fix)
    local level = ship:queryAttrib("level");

    local magic = level * 2 + 18;

    -- 1. 攻击+N%
    local prop = PropM.combine(ship, "attrib", "magic");
    magic = PropM.apply(prop, magic);

    -- 2. 攻击+N
    prop = PropM.combine(ship, "attrib2", "magic");
    magic = PropM.apply(prop, magic);

    -- 幽灵船能力增强
    prop = PropM.combine(ME.user, "attrib_ship", "magic");
    magic = PropM.apply(prop, magic);

    return magic;
end
